package com.googlecode.gwtbb.client.only.widget.form;

import com.google.gwt.user.client.ui.ClickListener;
import com.google.gwt.user.client.ui.Widget;
import com.googlecode.gwtbb.client.only.remote.ClientSession;
import com.googlecode.gwtbb.client.only.widget.basic.Hypolink;
import com.googlecode.gwtbb.client.only.widget.form.user.LoginForm;

/**
 * @author Abraham Grief
 * @version $Id$
 * @since May 28, 2008
 */
public abstract class LoginProtectedLink extends Hypolink {
	private LoginProtectedClickListener delegate;

	protected LoginProtectedLink(ClientSession session, String linkText) {
		super(linkText);
		addClickListener(new LoginProtectedClickListener(session) {
			public void ifLoggedIn() {
				LoginProtectedLink.this.ifLoggedIn();
			}
		});
	}

	public abstract void ifLoggedIn();
}